<?php

namespace App\Http\Controllers\Guard\Shop;

use App\Http\Controllers\Common\GuardController;
use App\Models\Shop\Goods\GoodsSpecValue;
use Illuminate\Http\Request;

class GoodsSpecValueController extends GuardController {

    public function add(Request $request) {
        $name = $request->input('name');
        $spec_id = $request->input('spec_id');

        $this->validate($request, [
            'name'=>'required',
            'spec_id'=>'required',
        ]);

        $records = GoodsSpecValue::create(compact('name','spec_id'));
        return responseSuccess($records->toArray());
    }



}
